<yandex>
<!-- 集群配置 -->
<remote_servers>
    <{{ clickhouse_cluster_name }}>
        <!-- 数据分片1  -->
        <shard>
            <internal_replication>true</internal_replication>
            <replica>
                <host>{{ hostvars['clickhouse-cluster-1'].ansible_host }}</host>
                <port>9000</port>
                <user>default</user>
                <password>{{ clickhouse_password }}</password>
             </replica>
             <replica>
                <host>{{ hostvars['clickhouse-cluster-2'].ansible_host }}</host>
                <port>9000</port>
                <user>default</user>
                <password>{{ clickhouse_password }}</password>
             </replica>
        </shard>
    </{{ clickhouse_cluster_name }}>
</remote_servers>
<!-- 本节点副本名称 -->
<macros>
    <replica>{{ ansible_host }}</replica>
    <cluster>{{ clickhouse_cluster_name }}</cluster>
    <shard>1</shard>
</macros>
<!-- 监听网络 -->
<networks>
   <ip>::/0</ip>
</networks>
<!-- ZK  -->
<zookeeper-servers>
  <node index="1">
    <host>{{ hostvars['zookeeper-cluster-1'].ansible_host }}</host>
    <port>2181</port>
  </node>
  <node index="2">
    <host>{{ hostvars['zookeeper-cluster-2'].ansible_host }}</host>
    <port>2181</port>
  </node>
  <node index="3">
    <host>{{ hostvars['zookeeper-cluster-3'].ansible_host }}</host>
    <port>2181</port>
  </node>
</zookeeper-servers>
<!-- 数据压缩算法  -->
<clickhouse_compression>
<case>
  <min_part_size>10000000000</min_part_size>
  <min_part_size_ratio>0.01</min_part_size_ratio>
  <method>lz4</method>
</case>
</clickhouse_compression>
</yandex>
